﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Decorator
{
    /// <summary>
    /// 装饰抽象类
    /// </summary>
    public abstract class Decorator : Phone
    {
        private Phone phone = null;

        public void Decorate(Phone phone)
        {
            this.phone = phone;
        }

        public override void Print()
        {
            if(phone != null)
            {
                phone.Print();
            }
        }
    }
}
